/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DTO;

import java.sql.Date;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Documents
 */
public class DTONguoiDung {
    int iD;
    String tenDangNhap;
    String matKhau;
    String hoTen;
    String gioiTinh;
    String email;
    Date ngayTao;
    
    public int getID(){
        return iD;
    }
    
    public void setID(int iD){
        this.iD = iD;
    }
    
    public String getTenDangNhap() {
        return tenDangNhap;
    }
    
    public void setTenDangNhap(String tenDangNhap){
        this.tenDangNhap = tenDangNhap;
    }
    
    public String getMatKhau(){
        return matKhau;
    }
    
    public void setMatKhau(String matKhau){
        this.matKhau = matKhau;
    }
        
    public String getHoTen(){
        return hoTen;
    }
    
    public void setHoTen(String hoTen){
        this.hoTen = hoTen;
    }
    
    public String getGioiTinh(){
        return gioiTinh;
    }
    
    public void setGioiTinh(String gioiTinh){
        this.gioiTinh = gioiTinh;
    }
    
    public String getEmail(){
        return email;
    }
    
    public void setEmail(String email){
        this.email = email;
    }
    
    public Date getNgayTao(){
        return ngayTao;
    }
    
    public void setNgayTao(Date ngayTao){
        this.ngayTao = ngayTao;
    }
    
    public DTONguoiDung(){}
    
    public DTONguoiDung (ResultSet rs) throws SQLException
    {
        this.iD = rs.getInt("id");
        this.tenDangNhap = rs.getString("tendangnhap");
        this.matKhau = rs.getString("matkhau");
        this.hoTen = rs.getString("hoten");
        this.gioiTinh = rs.getString("gioitinh");
        this.email = rs.getString("email");
        this.ngayTao = rs.getDate("ngaytao");
    }
    
    public DTONguoiDung (int iD, String tenDangNhap, String matKhau, String nhapLaiMK, String hoTen,
                            String gioiTinh, String email, Date ngayTao)
    {
        this.iD = iD;
        this.tenDangNhap = tenDangNhap;
        this.matKhau = matKhau;
        this.hoTen = hoTen;
        this.gioiTinh = gioiTinh;
        this.email = email;
        this.ngayTao = ngayTao;
    }
}
